using System.Collections;
using System.Data;

namespace GAS.Common.DbAccess
{
	/// <summary>
	/// Description of IDbAccess.
	/// </summary>
	public interface IDbAccess
	{
		bool SafeMapping { set;}

		IDbConnection GetConnection();

		void ReturnConnection(IDbConnection connection);

		int FillDataSet(IDbConnection connection, DataSet ds, string sqlString, string tableName);

		int FillDataSet(IDbConnection connection, DataSet ds, string sqlString, string tableName, IList parameters);

		int UpdateDataSet(IDbConnection connection, IDbTransaction transaction, DataSet ds, string tableName, string sqlInsert, string sqlUpdate, string sqlDelete, IList insertParams, IList updateParams, IList deleteParams, bool continueUpdateOnError);

		IDataReader ExecuteDataReader(IDbConnection connection, string sqlString);

		IDataReader ExecuteDataReader(IDbConnection connection, string sqlString, IList parameters);

		object ExecuteScalar(IDbConnection connection, string sqlString);

		object ExecuteScalar(IDbConnection connection, IDbTransaction transaction, string sqlString);

		object ExecuteScalar(IDbConnection connection, string sqlString, IList parameters);

		int ExecuteNonQuery(IDbConnection connection, IDbTransaction transaction, string sqlString);

		int ExecuteNonQuery(IDbConnection connection, IDbTransaction transaction, string sqlString, IList parameters);

		int ExecuteNonQueryStoredProcedure(IDbConnection connection, IDbTransaction transaction, string sqlString);

		int ExecuteNonQueryStoredProcedure(IDbConnection connection, IDbTransaction transaction, string sqlString, IList parameters);

		void CreateNewWhereParameter(bool isEqual, object parameterValue, string sourceColumn, DataRowVersion version, string parameterName, object parameterType, int parameterLength, ref bool firstFieldExists, ref string sqlString, IList parameters, bool haveWildcards, bool toUpper);

		void CreateNewWhereListParameter(bool isEqual, IList parameterValues, string parameterNamePrefix, object parameterType, ref bool firstFieldExists, ref string sqlString, IList parameters);

		void CreateNewInsertParameter(object parameterValue, string sourceColumn, DataRowVersion version, string parameterName, object parameterType, int parameterLength, ref bool firstFieldExists, ref string sqlStringFieldNames, ref string sqlStringFieldValues, IList parameters);

		void CreateNewUpdateParameter(object parameterValue, string sourceColumn, DataRowVersion version, string parameterName, object parameterType, int parameterLength, ref bool firstFieldExists, ref string sqlStringNameValuePairs, IList parameters);

		void CreateNewParameter(object parameterValue, string parameterName, object parameterType, int parameterLength, IList parameters);

		object NextSequenceValue(IDbConnection connection, IDbTransaction transaction, string sequenceName);
	}
}